// ============================== 导入依赖 ============================== //

import API from './API'
import { transOne } from '../../DetailTransformator/store/actions'

// ============================== 导出异步调用 ============================== //

export default {
  // —————————————————————————————— 单项 —————————————————————————————— //

  async remoteOne({ state: { one, DICT } }) {
    if (!one.id) return {}

    const obj = await API.getOne(one, '查询设备详情')
    return transOne(obj, DICT)
  },
}
